package org.jdbcparser.database;

import java.util.ArrayList;
import java.util.List;

public class RowSet {

	private String tableName;
	private List<String> columnOrdering;
	private List<Object[]> rows; 

	public RowSet(String tableName, List<String> columnOrdering) {
		this.tableName = tableName;
		this.columnOrdering = columnOrdering;
		this.rows = new ArrayList<Object[]>();
	}

	public String getTableName() {
		return tableName;
	}

	public List<String> getColumnOrdering() {
		return columnOrdering;
	}
	
	public String[] getColumnOrderingArray() {
		return getColumnOrdering().toArray(new String[0]);
	}
	
	public void addRow(Object[] row) {
		rows.add(row);
	}
	
	public void clearRows() {
		rows.clear();
	}
	
	public List<Object[]> getRows() {
		return rows;
	}

}
